package leecode

func findLengthOfLCIS(nums []int) int {
	dp := make([]int, len(nums)) //dp数组为nums[i]的前方有几个连续比它小的
	for i := 0; i < len(dp); i++ {
		dp[i] = 1
	}
	result := 1
	for i := 1; i < len(nums); i++ {
		if nums[i] > nums[i-1] {
			dp[i] = dp[i-1] + 1
		}
		result = max(result, dp[i])
	}
	return result
}
